/**
* @author:rex lee
* @email:duguying2008@gmail.com
* @qq:706639632
* @site:http://www.duguying.net
* @github:http://github.com/duguying
**/
$(document).ready(function(){
	var v=$("div.video>h4>:image");
	var c=$("meta[name=vote]").attr('content');

	v.click(function() {
		var vid=$(this).val();
		$.ajax({
			type: "post",
			dataType: "json",
			url: c,
			data: {'vid':vid},
			async: true,
			success: function(json){
				if (json['result']) {
					$("#vcount"+vid).html("票数:"+json['c']);
					// console.log($("#vcount"));
					alert(json['msg']);
				} else{
					alert(json['msg']);
				};
			}
		});
	})


	if($(".login").attr("title")=="未登录"){
		$(".login").click(function() {
			$("form").show("slow");
			if (navigator.userAgent.indexOf("MSIE")>0) {
				$("form").css({position:"absolute",left:0,top:0})
			};
		});
		
	}
});

